//Map Reader Header File
//Reads data from a file to build a map
//Blue Laser Games		May 4, 2011

#pragma once
//Windows Include Files
#include <vector>
#include <Windows.h>
#include <fstream>
#include <string>
#include "Globals.h"

//SDK Include Files

//Project Include Files


struct TileData
{
	int Object;			//Use object Enumeration
	int Owner;			//Use owner Enumeration
	int Direction;		//Use direction Enumeration
	int Passable;		//Use owner Enumeration
};

class MapReader
{
protected:

	std::vector<std::vector<TileData>> MapData;

public:
	MapReader();									//Default Constructor
	void Init();									//Initialize Data in MapReader

	~MapReader();									//Destructor
	void Shutdown();								//Release Data in MapReader

	void ReadMapFromBitmap(LPCSTR Filename);	//Creates the map from a bitmap image
	bool ReadMapFromText(LPCSTR FileName);		//Creates the map from a text file

	bool MoveObject(int x, int y, int Direction);	//Moves the object on the map class
	void RotateObject(int x, int y, int EastWest);	//Rotates the object on the map class

	TileData* SetMapData(int x, int y);			//Write Map Data
	TileData  GetMapData(int x, int y);			//Read Map Data

	void ClearMap();



	int GetWidth();
	int GetHeight();
	int GetArea();

};